@{    
    Ajax.Dna().Widget()
        .Content(
    @<text>
    <div style="text-align: center; border: ">
        @if (string.IsNullOrEmpty(item.UserPreferences["Summary"] as string))
        {
            <h2 style="text-align: center" class="">
                Donate via Paypal</h2>
        }
        else
        { 
            <div style="margin: 5px;">
                @MvcHtmlString.Create(Server.HtmlDecode(item.UserPreferences["Summary"].ToString()))
            </div>
        }
        @Html.Image("https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif")
        <form method="post" action="https://www.paypal.com/cgi-bin/webscr">
        <input type="hidden" value="_donations" name="cmd" />
        @Html.Hidden("business", item.UserPreferences["Business"])
        @Html.Hidden("item_name", item.UserPreferences["ItemName"])
        @Html.Hidden("item_number", Guid.NewGuid().ToString().Replace("-", ""))
        <input type="hidden" value="1" name="no_note" />
        <input type="hidden" name="no_shipping" value="2" />
        <input type="hidden" value="USD" name="currency_code" />
        @Html.Hidden("return", item.UserPreferences["ReturnUrl"])
        <input type="hidden" value="0" name="tax" />
        <input type="hidden" value="US" name="lc" />
        <table style="width:100%;">
            <tr>
                <td>
                    @Html.Global("RES_AMOUNT") &nbsp;$
                </td>
                <td>
                    @Ajax.Dna().Number("amount", Convert.ToInt32(item.UserPreferences["Amount"] != null ? item.UserPreferences["Amount"] : 10)).Width(50).GetHtml()
                </td>
                <td colspan="2">
                    @Ajax.Button(Html.Global("RES_DONATE"), "", "$(this).parents('form').submit();")
                </td>
            </tr>
        </table>
        </form>
    </div>
    </text>
    )
        .Render();
}
